﻿
@model List<WebApplication.Models.DataSet>

@{
    ViewBag.Title = "Create work";

    var ActivationFunction = new List<string>
    {
        "Linear",
        "Threshold",
        "ThresholdSymmetric",
        "Sigmoid",
        "SigmoidStepWise",
        "SigmoidSymmetric",
        "SigmoidSymmetricStepWise",
        "Gaussian",
        "GaussianSymmetric",
        "GaussianStepwise",
        "Elliot",
        "ElliotSymmetric",
        "LinearPiece",
        "LinearPieceSymmetric",
        "SinSymmetric",
        "CosSymmetric"
    };


    var TrainingAlgorithm = new List<string>
    {

        "Incremental",
        "Batch",
        "RProp",
        "QuickProp"
    };

    List<SelectListItem> datasets = new List<SelectListItem>();

    foreach (var m in Model)
    {
        datasets.Add(new SelectListItem
        {
            Text = m.id + " " + m.name,
            Value = m.id.ToString()

        });
    }





}

<h2>Create work</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
      
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })


        <div class="form-group">
            @Html.Label("DataSet", htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.DropDownList("idDataSet", datasets, new {htmlAttributes = new {@class = "form-control"}})
          
            </div>
        </div>


        <div class="form-group">
            @Html.Label("Thraining method", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("method", TrainingAlgorithm.Select(tz => new SelectListItem()
           {
               Text = tz,
               Value = tz
           }))

            </div>
        </div>

        <div class="form-group">
            @Html.Label("Function hiden", htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.DropDownList("hiden", ActivationFunction.Select(tz => new SelectListItem()
                {
                    Text = tz,
                    Value = tz
                }))

            </div>
        </div>


        <div class="form-group">
            @Html.Label("Function output", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("output", ActivationFunction.Select(tz => new SelectListItem()
           {
               Text = tz,
               Value = tz
           }))

            </div>
        </div>


    


        <div class="form-group">
            @Html.Label("Layers", htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.TextBox("Layers")
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Max epoch", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextBox("max")
            </div>
        </div>


        <div class="form-group">
            @Html.Label("Save ever epoch", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextBox("step")
            </div>
        </div>




        <div class="form-group">
            @Html.Label("Name", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextBox("name")
            
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Note", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextArea("note")
             
            </div>
        </div>

     
        <div class="form-group">@Html.Label("Start before create", htmlAttributes: new { @class = "control-label col-md-2" })
        @Html.CheckBox("start", true)
            <div class="col-md-offset-2 col-md-10">
              
                <input type="submit" value="Create" class="btn btn-default"/>
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
